//
//  StatusButtonView.h
//  KidReading
//
//  Created by telen on 14/12/18.
//  Copyright (c) 2014年 刘赞黄Telen. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface StatusButtonView : UIView
@property(nonatomic,strong)NSDictionary* userInfo;
@end

typedef void(^StatusButtonClicked)(StatusButtonView* sBtn);

#pragma mark-

@class StatusButton_2_View;

@protocol StatusButton_2_ViewDelegate <NSObject>

@optional
- (void)statusButton_2_View_didClicked:(StatusButton_2_View*)sbview;

@end

@interface StatusButton_2_View : StatusButtonView
{
    UIButton* button;
    //
    NSString* imageOnStr;
    NSString* imageOffStr;
    //
    UIImageView* imgvOn;
    UIImageView* imgvOff;
}
@property(nonatomic,readonly)BOOL onOff;
@property(nonatomic,weak)id<StatusButton_2_ViewDelegate> delegate;
@property(nonatomic,copy)StatusButtonClicked btnClicked;

- (instancetype)initWithFrame:(CGRect)frame imageOn:(NSString*)onStr imageOff:(NSString*)offStr;
- (void)updateImageOn:(NSString*)onStr imageOff:(NSString*)offStr;

- (void)setButtonStatus:(BOOL)status;//按钮的状态，对应onOff的状态值

- (void)setAni_UImageArr:(NSArray*)imageArr ani_duration:(NSTimeInterval)dur forStatus:(BOOL)status;

- (void)setImageViewFrame:(CGRect)frame;

- (void)setDisAbleImageStr:(NSString*)disStr;
- (void)setDisAble:(BOOL)yn;

@end


#pragma mark-
@interface StatusButton_2_ViewDefine : StatusButton_2_View
@property(nonatomic,strong)UIView* viewBg;
@property(nonatomic,strong)UIView* viewOn;
@property(nonatomic,strong)UIView* viewOff;
@end


#pragma mark- 

@class StatusButton_3_View;

typedef enum : NSUInteger {
    StatusButton_3_View_Status_normal,
    StatusButton_3_View_Status_work,
    StatusButton_3_View_Status_forbit,
    //
    StatusButton_3_View_Status_fast = StatusButton_3_View_Status_work,
    StatusButton_3_View_Status_slower = StatusButton_3_View_Status_forbit,
    //
    StatusButton_3_View_Status_work2 = StatusButton_3_View_Status_forbit,
    //
} StatusButton_3_View_Status;

@protocol StatusButton_3_ViewDelegate <NSObject>

@optional
- (void)statusButton_3_View_didClicked:(StatusButton_3_View*)sbview;
- (void)statusButton_3_View_swipeToLeft:(StatusButton_3_View *)sbview;
- (void)statusButton_3_View_swipeToRight:(StatusButton_3_View *)sbview;

@end

@interface StatusButton_3_View : StatusButtonView
{
    UIButton* button;
    //
    NSString* imageNStr;
    NSString* imageWStr;
    NSString* imageFStr;
    //
    UIImageView* imgvN;
    UIImageView* imgvW;
    UIImageView* imgvF;
}
@property(nonatomic,readonly)StatusButton_3_View_Status status;
@property(nonatomic,weak)id<StatusButton_3_ViewDelegate> delegate;
@property(nonatomic,copy)StatusButtonClicked btnClicked;

- (instancetype)initWithFrame:(CGRect)frame imageNormal:(NSString*)nStr imageWork:(NSString*)wStr imageForbit:(NSString*)fStr;

- (void)setButtonStatus:(StatusButton_3_View_Status)status;

- (void)setAni_UImageArr:(NSArray*)imageArr ani_duration:(NSTimeInterval)dur forStatus:(StatusButton_3_View_Status)status;

@end
